import time
import re

def full_time(time_str):
    # 获取当前时间，如果没有，则为当前时间
    t = time.localtime(time.time())
    now = "%4d-%02d-%02d" % (t.tm_year, t.tm_mon, t.tm_mday)  # 现在的时间
    # 正则表达式匹配日期值
    cmp = re.compile(r"\d{4}-\d{2}-\d{2}")  # 2019-06-28
    res = cmp.match(time_str)
    if res is not None:
        return res.group()
    else:
        cmp = re.compile(r"\d{1,2}-\d{2}")  # 06-28
        res = cmp.match(time_str)
        if res is not None:
            return "%4d-%s" % (t.tm_year, str(res.group()))
        else:
            return now

print(full_time("6-21 18:22"))
